<template>
	<view class="wrap">
		<u-navbar title="资产管理" :placeholder="true" :safeAreaInsetTop="false" :autoBack = "true" height = "50">
			<view class="slot-wrap" slot="right">
				<view class="navbar-right">
					<view class="right-item">
						<u-icon name="search" color="#00aaff" size="42" @click="showSearch"></u-icon>
					</view>
				</view>
			</view>
		</u-navbar>
		<view class="uviewSearch">
			<u-search v-model="searchText" v-if="showZySearch" :radius="100" @search="getSearchText"
				placeholder="请输入资产名称进行查询" :clearabled="true" @clear="getSearchText" @custom="getSearchText" :showAction="false">
			</u-search>
		</view>
		<swiper class="swiper-box">
			<swiper-item class="swiper-item" @touchmove.stop>
				<scroll-view scroll-y style="height: 100%;width: 100%;" enable-back-to-top="true"
					@scrolltolower="reachBottom" :refresher-enabled="true" :refresher-triggered="refresherTriggered"
					@refresherrefresh="refresherrefresh">
					<view class="page-box">
						<view class="not_exam_data" v-for="(item, index) in currentInventoryList" :key="index" @click="itemInfo(item.id,item.warehouseName, item.goodName, item.goodID, item.unitName, item.standard)">
							<view class="header">
								<view class="header-left">
									<u-text :text="item.warehouseName" :bold="true" size="17"></u-text>
								</view>
								<view class="heade-right">
									<u-tag v-if="item.warningStatus == '正常'" shape="circle" :text="item.warningStatus" size="mini"></u-tag>
									<u-tag v-if="item.warningStatus == '预警'" shape="circle" :text="item.warningStatus" size="mini" type="error"></u-tag>
								</view>
							</view>
							<u-line></u-line>
							<view class="center">
								<view class="center_top">
									<u-text :text="`商品名称: ${item.goodName}`" color="#00aaff" :bold="true"></u-text>
								</view>
								<view class="center_center">
									<u-text :text="`商品编码: ${item.goodID}`"></u-text>
									<u-text :text="`商品单位: ${item.unitName}`"></u-text>
								</view>
								<view class="center_standard">
									<u-text :text="`商品规格: ${item.standard}`"></u-text>
								</view>
								<view class="center_amount">
									<u-text :text="`当前库存: ${item.amount}`" color="#ff5500"></u-text>
									<u-text :text="`预警库存: ${item.warningAmount}`" color="#ff5500"></u-text>
								</view>
								<view class="center_bottom">
									<u-text :text="`占用库存: ${item.freezeAmount}`" color="#ff5500"></u-text>
									<u-text :text="`可用库存: ${item.availableAmount}`" color="#ff5500"></u-text>
								</view>
							</view>
						</view>
						<u-loadmore :status="loadStatus" bgColor="#f2f2f2"></u-loadmore>
					</view>
				</scroll-view>
			</swiper-item>
		</swiper>
		<u-toast ref="uToast" />
		<view class="bottom">
			<view class="btn-back">
				<u-button type="primary" text="返回" @click="goBack()"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
</script>

<style>
</style>